package plugins

import "errors"

// 是否为空
func StringIsEmpty(content string) bool {
	return len(content) == 0
}

// 是否相等
func StringIsEquality(s1 string, s2 string, warning string) (bool, error) {
	isEquality := (!StringIsEmpty(s1) && !StringIsEmpty(s2) && (s1 == s2))
	var equalityErr error = nil
	if !isEquality {
		equalityErr = errors.New(warning)
	}
	return isEquality, equalityErr
}
